package com.zsl.picture.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zsl.picture.model.Messages;
import com.zsl.picture.mapper.MessagesMapper;
import com.zsl.picture.service.MessagesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 留言表 服务实现类
 * </p>
 *
 * @author zsl
 * @since 2022-03-03
 */
@Service
public class MessagesServiceImpl extends ServiceImpl<MessagesMapper, Messages> implements MessagesService {
    @Autowired
    MessagesMapper messagesMapper;

    @Override
    public List<Messages> queryMessages(Integer pid) {
        return messagesMapper.selectList(new QueryWrapper<Messages>().eq("p_id",pid));

    }
}
